﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace TestAngular.Migrations
{
    public partial class Customers_CustomerType_ParentId : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropForeignKey(
                name: "FK_BasicArchivesCustomerType_BasicArchivesCustomerType_CustomerTypeId",
                table: "BasicArchivesCustomerType");

            migrationBuilder.DropIndex(
                name: "IX_BasicArchivesCustomerType_CustomerTypeId",
                table: "BasicArchivesCustomerType");

            migrationBuilder.DropColumn(
                name: "CustomerTypeId",
                table: "BasicArchivesCustomerType");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<Guid>(
                name: "CustomerTypeId",
                table: "BasicArchivesCustomerType",
                type: "uniqueidentifier",
                nullable: true);

            migrationBuilder.CreateIndex(
                name: "IX_BasicArchivesCustomerType_CustomerTypeId",
                table: "BasicArchivesCustomerType",
                column: "CustomerTypeId");

            migrationBuilder.AddForeignKey(
                name: "FK_BasicArchivesCustomerType_BasicArchivesCustomerType_CustomerTypeId",
                table: "BasicArchivesCustomerType",
                column: "CustomerTypeId",
                principalTable: "BasicArchivesCustomerType",
                principalColumn: "Id");
        }
    }
}
